package com.qfedu.meidijiaju.service.impl;

import com.qfedu.meidijiaju.service.TopicService;
import com.qfedu.meidijiaju.entity.Topic;
import com.qfedu.meidijiaju.entity.UserAndTopic;
import com.qfedu.meidijiaju.mapper.TopicMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TopicServiceImpl implements TopicService {

    @Autowired
    private TopicMapper topicMapper;

    @Override
    public List<UserAndTopic> queryTopic(int uid) {
        return topicMapper.queryTopic(uid);
    }

    @Override
    public int queryCount(int uid) {
        return topicMapper.queryCount(uid);
    }

    @Override
    public boolean addTopic(UserAndTopic userAndTopic) {
        return topicMapper.addTopic(userAndTopic);
    }

    @Override
    public boolean daleteTopic(UserAndTopic userAndTopic) {
        return topicMapper.deleteTopic(userAndTopic);
    }
}
